package com.qiche.dto;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class RegisterDto{

	@NotBlank
	@Pattern(regexp ="^[a-zA-Z0-9_]{6,12}$",message = "用户名格式错误")
	private String username;

	@NotBlank
	@Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$",message = "密码格式错误")
	private String password;

	@NotBlank
	private String contacts;

	@NotBlank
	private String phone;

	@NotNull
	private Long regionId;

	@NotBlank
	private String merchantName;

	@NotBlank
	private String merchantAddress;

	@NotBlank
	private String verifyCode;


}
